3.192 \(\int \frac{\sqrt{a+b x+c x^2} (d+e x+f x^2)}{(g+h x)^3} \, dx\)

Optimal. Leaf size=448 \[ \frac{\tanh ^{-1}\left (\frac{-2 a h+x (2 c g-b h)+b g}{2 \sqrt{a+b x+c x^2} \sqrt{a h^2-b g h+c g^2}}\right ) \left (h^2 \left (8 a^2 f h^2-4 a b h (6 f g-e h)+b^2 \left (15 f g^2-h (d h+3 e g)\right )\right )-4 c h \left (b g^2 (10 f g-3 e h)-a h \left (d h^2-3 e g h+9 f g^2\right )\right )+8 c^2 g^3 (3 f g-e h)\right )}{8 h^4 \left (a h^2-b g h+c g^2\right )^{3/2}}-\frac{\left (a+b x+c x^2\right )^{3/2} \left (f g^2-h (e g-d h)\right )}{2 h (g+h x)^2 \left (a h^2-b g h+c g^2\right )}+\frac{\sqrt{a+b x+c x^2} \left (-2 h x \left (-2 a f h+2 b f g-c d h+c e g-\frac{3 c f g^2}{h}\right )+4 a h (3 f g-e h)-b \left (-d h^2-3 e g h+11 f g^2\right )+\frac{4 c g^2 (3 f g-e h)}{h}\right )}{4 h^2 (g+h x) \left (a h^2-b g h+c g^2\right )}-\frac{\tanh ^{-1}\left (\frac{b+2 c x}{2 \sqrt{c} \sqrt{a+b x+c x^2}}\right ) (-b f h-2 c e h+6 c f g)}{2 \sqrt{c} h^4} \]

[Out]

(((4*c*g^2*(3*f*g - e*h))/h + 4*a*h*(3*f*g - e*h) - b*(11*f*g^2 - 3*e*g*h - d*h^2) - 2*h*(c*e*g + 2*b*f*g - (3
*c*f*g^2)/h - c*d*h - 2*a*f*h)*x)*Sqrt[a + b*x + c*x^2])/(4*h^2*(c*g^2 - b*g*h + a*h^2)*(g + h*x)) - ((f*g^2 -
 h*(e*g - d*h))*(a + b*x + c*x^2)^(3/2))/(2*h*(c*g^2 - b*g*h + a*h^2)*(g + h*x)^2) - ((6*c*f*g - 2*c*e*h - b*f
*h)*ArcTanh[(b + 2*c*x)/(2*Sqrt[c]*Sqrt[a + b*x + c*x^2])])/(2*Sqrt[c]*h^4) + ((8*c^2*g^3*(3*f*g - e*h) - 4*c*
h*(b*g^2*(10*f*g - 3*e*h) - a*h*(9*f*g^2 - 3*e*g*h + d*h^2)) + h^2*(8*a^2*f*h^2 - 4*a*b*h*(6*f*g - e*h) + b^2*
(15*f*g^2 - h*(3*e*g + d*h))))*ArcTanh[(b*g - 2*a*h + (2*c*g - b*h)*x)/(2*Sqrt[c*g^2 - b*g*h + a*h^2]*Sqrt[a +
 b*x + c*x^2])])/(8*h^4*(c*g^2 - b*g*h + a*h^2)^(3/2))

________________________________________________________________________________________

Rubi [A]  time = 0.874962, antiderivative size = 446, normalized size of antiderivative = 1., number of steps used = 7, number of rules used = 6, integrand size = 32, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.188, Rules used = {1650, 812, 843, 621, 206, 724} \[ \frac{\tanh ^{-1}\left (\frac{-2 a h+x (2 c g-b h)+b g}{2 \sqrt{a+b x+c x^2} \sqrt{a h^2-b g h+c g^2}}\right ) \left (h^2 \left (8 a^2 f h^2-4 a b h (6 f g-e h)+b^2 \left (15 f g^2-h (d h+3 e g)\right )\right )-4 c h \left (b g^2 (10 f g-3 e h)-a h \left (d h^2-3 e g h+9 f g^2\right )\right )+8 c^2 g^3 (3 f g-e h)\right )}{8 h^4 \left (a h^2-b g h+c g^2\right )^{3/2}}-\frac{\left (a+b x+c x^2\right )^{3/2} \left (f g^2-h (e g-d h)\right )}{2 h (g+h x)^2 \left (a h^2-b g h+c g^2\right )}-\frac{\sqrt{a+b x+c x^2} \left (2 h x \left (-2 a f h+2 b f g-c d h+c e g-\frac{3 c f g^2}{h}\right )-4 a h (3 f g-e h)-b h (d h+3 e g)+11 b f g^2-\frac{4 c g^2 (3 f g-e h)}{h}\right )}{4 h^2 (g+h x) \left (a h^2-b g h+c g^2\right )}-\frac{\tanh ^{-1}\left (\frac{b+2 c x}{2 \sqrt{c} \sqrt{a+b x+c x^2}}\right ) (-b f h-2 c e h+6 c f g)}{2 \sqrt{c} h^4} \]

Antiderivative was successfully verified.

[In]

Int[(Sqrt[a + b*x + c*x^2]*(d + e*x + f*x^2))/(g + h*x)^3,x]

[Out]

-((11*b*f*g^2 - b*h*(3*e*g + d*h) - (4*c*g^2*(3*f*g - e*h))/h - 4*a*h*(3*f*g - e*h) + 2*h*(c*e*g + 2*b*f*g - (
3*c*f*g^2)/h - c*d*h - 2*a*f*h)*x)*Sqrt[a + b*x + c*x^2])/(4*h^2*(c*g^2 - b*g*h + a*h^2)*(g + h*x)) - ((f*g^2
- h*(e*g - d*h))*(a + b*x + c*x^2)^(3/2))/(2*h*(c*g^2 - b*g*h + a*h^2)*(g + h*x)^2) - ((6*c*f*g - 2*c*e*h - b*
f*h)*ArcTanh[(b + 2*c*x)/(2*Sqrt[c]*Sqrt[a + b*x + c*x^2])])/(2*Sqrt[c]*h^4) + ((8*c^2*g^3*(3*f*g - e*h) - 4*c
*h*(b*g^2*(10*f*g - 3*e*h) - a*h*(9*f*g^2 - 3*e*g*h + d*h^2)) + h^2*(8*a^2*f*h^2 - 4*a*b*h*(6*f*g - e*h) + b^2
*(15*f*g^2 - h*(3*e*g + d*h))))*ArcTanh[(b*g - 2*a*h + (2*c*g - b*h)*x)/(2*Sqrt[c*g^2 - b*g*h + a*h^2]*Sqrt[a
+ b*x + c*x^2])])/(8*h^4*(c*g^2 - b*g*h + a*h^2)^(3/2))

Rule 1650

Int[(Pq_)*((d_.) + (e_.)*(x_))^(m_)*((a_.) + (b_.)*(x_) + (c_.)*(x_)^2)^(p_), x_Symbol] :> With[{Q = Polynomia
lQuotient[Pq, d + e*x, x], R = PolynomialRemainder[Pq, d + e*x, x]}, Simp[(e*R*(d + e*x)^(m + 1)*(a + b*x + c*
x^2)^(p + 1))/((m + 1)*(c*d^2 - b*d*e + a*e^2)), x] + Dist[1/((m + 1)*(c*d^2 - b*d*e + a*e^2)), Int[(d + e*x)^
(m + 1)*(a + b*x + c*x^2)^p*ExpandToSum[(m + 1)*(c*d^2 - b*d*e + a*e^2)*Q + c*d*R*(m + 1) - b*e*R*(m + p + 2)
- c*e*R*(m + 2*p + 3)*x, x], x], x]] /; FreeQ[{a, b, c, d, e, p}, x] && PolyQ[Pq, x] && NeQ[b^2 - 4*a*c, 0] &&
 NeQ[c*d^2 - b*d*e + a*e^2, 0] && LtQ[m, -1]

Rule 812

Int[((d_.) + (e_.)*(x_))^(m_)*((f_.) + (g_.)*(x_))*((a_.) + (b_.)*(x_) + (c_.)*(x_)^2)^(p_.), x_Symbol] :> Sim
p[((d + e*x)^(m + 1)*(e*f*(m + 2*p + 2) - d*g*(2*p + 1) + e*g*(m + 1)*x)*(a + b*x + c*x^2)^p)/(e^2*(m + 1)*(m
+ 2*p + 2)), x] + Dist[p/(e^2*(m + 1)*(m + 2*p + 2)), Int[(d + e*x)^(m + 1)*(a + b*x + c*x^2)^(p - 1)*Simp[g*(
b*d + 2*a*e + 2*a*e*m + 2*b*d*p) - f*b*e*(m + 2*p + 2) + (g*(2*c*d + b*e + b*e*m + 4*c*d*p) - 2*c*e*f*(m + 2*p
 + 2))*x, x], x], x] /; FreeQ[{a, b, c, d, e, f, g, m}, x] && NeQ[b^2 - 4*a*c, 0] && NeQ[c*d^2 - b*d*e + a*e^2
, 0] && RationalQ[p] && p > 0 && (LtQ[m, -1] || EqQ[p, 1] || (IntegerQ[p] &&  !RationalQ[m])) && NeQ[m, -1] &&
  !ILtQ[m + 2*p + 1, 0] && (IntegerQ[m] || IntegerQ[p] || IntegersQ[2*m, 2*p])

Rule 843

Int[((d_.) + (e_.)*(x_))^(m_)*((f_.) + (g_.)*(x_))*((a_.) + (b_.)*(x_) + (c_.)*(x_)^2)^(p_.), x_Symbol] :> Dis
t[g/e, Int[(d + e*x)^(m + 1)*(a + b*x + c*x^2)^p, x], x] + Dist[(e*f - d*g)/e, Int[(d + e*x)^m*(a + b*x + c*x^
2)^p, x], x] /; FreeQ[{a, b, c, d, e, f, g, m, p}, x] && NeQ[b^2 - 4*a*c, 0] && NeQ[c*d^2 - b*d*e + a*e^2, 0]
&&  !IGtQ[m, 0]

Rule 621

Int[1/Sqrt[(a_) + (b_.)*(x_) + (c_.)*(x_)^2], x_Symbol] :> Dist[2, Subst[Int[1/(4*c - x^2), x], x, (b + 2*c*x)
/Sqrt[a + b*x + c*x^2]], x] /; FreeQ[{a, b, c}, x] && NeQ[b^2 - 4*a*c, 0]

Rule 206

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1*ArcTanh[(Rt[-b, 2]*x)/Rt[a, 2]])/(Rt[a, 2]*Rt[-b, 2]), x]
 /; FreeQ[{a, b}, x] && NegQ[a/b] && (GtQ[a, 0] || LtQ[b, 0])

Rule 724

Int[1/(((d_.) + (e_.)*(x_))*Sqrt[(a_.) + (b_.)*(x_) + (c_.)*(x_)^2]), x_Symbol] :> Dist[-2, Subst[Int[1/(4*c*d
^2 - 4*b*d*e + 4*a*e^2 - x^2), x], x, (2*a*e - b*d - (2*c*d - b*e)*x)/Sqrt[a + b*x + c*x^2]], x] /; FreeQ[{a,
b, c, d, e}, x] && NeQ[b^2 - 4*a*c, 0] && NeQ[2*c*d - b*e, 0]

Rubi steps

\begin{align*} \int \frac{\sqrt{a+b x+c x^2} \left (d+e x+f x^2\right )}{(g+h x)^3} \, dx &=-\frac{\left (f g^2-h (e g-d h)\right ) \left (a+b x+c x^2\right )^{3/2}}{2 h \left (c g^2-b g h+a h^2\right ) (g+h x)^2}-\frac{\int \frac{\left (\frac{1}{2} \left (-4 c d g+3 b e g+4 a f g-\frac{3 b f g^2}{h}+b d h-4 a e h\right )+\left (c e g+2 b f g-\frac{3 c f g^2}{h}-c d h-2 a f h\right ) x\right ) \sqrt{a+b x+c x^2}}{(g+h x)^2} \, dx}{2 \left (c g^2-b g h+a h^2\right )}\\ &=-\frac{\left (11 b f g^2-b h (3 e g+d h)-\frac{4 c g^2 (3 f g-e h)}{h}-4 a h (3 f g-e h)+2 h \left (c e g+2 b f g-\frac{3 c f g^2}{h}-c d h-2 a f h\right ) x\right ) \sqrt{a+b x+c x^2}}{4 h^2 \left (c g^2-b g h+a h^2\right ) (g+h x)}-\frac{\left (f g^2-h (e g-d h)\right ) \left (a+b x+c x^2\right )^{3/2}}{2 h \left (c g^2-b g h+a h^2\right ) (g+h x)^2}+\frac{\int \frac{\frac{1}{2} \left (2 (2 b g-2 a h) \left (c e g+2 b f g-\frac{3 c f g^2}{h}-c d h-2 a f h\right )+b \left (3 b f g^2-b h (3 e g+d h)+4 h (c d g-a f g+a e h)\right )\right )-\frac{2 (6 c f g-2 c e h-b f h) \left (c g^2-b g h+a h^2\right ) x}{h}}{(g+h x) \sqrt{a+b x+c x^2}} \, dx}{4 h^2 \left (c g^2-b g h+a h^2\right )}\\ &=-\frac{\left (11 b f g^2-b h (3 e g+d h)-\frac{4 c g^2 (3 f g-e h)}{h}-4 a h (3 f g-e h)+2 h \left (c e g+2 b f g-\frac{3 c f g^2}{h}-c d h-2 a f h\right ) x\right ) \sqrt{a+b x+c x^2}}{4 h^2 \left (c g^2-b g h+a h^2\right ) (g+h x)}-\frac{\left (f g^2-h (e g-d h)\right ) \left (a+b x+c x^2\right )^{3/2}}{2 h \left (c g^2-b g h+a h^2\right ) (g+h x)^2}-\frac{(6 c f g-2 c e h-b f h) \int \frac{1}{\sqrt{a+b x+c x^2}} \, dx}{2 h^4}+\frac{\left (8 c^2 g^3 (3 f g-e h)-4 c h \left (b g^2 (10 f g-3 e h)-a h \left (9 f g^2-3 e g h+d h^2\right )\right )+h^2 \left (8 a^2 f h^2-4 a b h (6 f g-e h)+b^2 \left (15 f g^2-h (3 e g+d h)\right )\right )\right ) \int \frac{1}{(g+h x) \sqrt{a+b x+c x^2}} \, dx}{8 h^4 \left (c g^2-b g h+a h^2\right )}\\ &=-\frac{\left (11 b f g^2-b h (3 e g+d h)-\frac{4 c g^2 (3 f g-e h)}{h}-4 a h (3 f g-e h)+2 h \left (c e g+2 b f g-\frac{3 c f g^2}{h}-c d h-2 a f h\right ) x\right ) \sqrt{a+b x+c x^2}}{4 h^2 \left (c g^2-b g h+a h^2\right ) (g+h x)}-\frac{\left (f g^2-h (e g-d h)\right ) \left (a+b x+c x^2\right )^{3/2}}{2 h \left (c g^2-b g h+a h^2\right ) (g+h x)^2}-\frac{(6 c f g-2 c e h-b f h) \operatorname{Subst}\left (\int \frac{1}{4 c-x^2} \, dx,x,\frac{b+2 c x}{\sqrt{a+b x+c x^2}}\right )}{h^4}-\frac{\left (8 c^2 g^3 (3 f g-e h)-4 c h \left (b g^2 (10 f g-3 e h)-a h \left (9 f g^2-3 e g h+d h^2\right )\right )+h^2 \left (8 a^2 f h^2-4 a b h (6 f g-e h)+b^2 \left (15 f g^2-h (3 e g+d h)\right )\right )\right ) \operatorname{Subst}\left (\int \frac{1}{4 c g^2-4 b g h+4 a h^2-x^2} \, dx,x,\frac{-b g+2 a h-(2 c g-b h) x}{\sqrt{a+b x+c x^2}}\right )}{4 h^4 \left (c g^2-b g h+a h^2\right )}\\ &=-\frac{\left (11 b f g^2-b h (3 e g+d h)-\frac{4 c g^2 (3 f g-e h)}{h}-4 a h (3 f g-e h)+2 h \left (c e g+2 b f g-\frac{3 c f g^2}{h}-c d h-2 a f h\right ) x\right ) \sqrt{a+b x+c x^2}}{4 h^2 \left (c g^2-b g h+a h^2\right ) (g+h x)}-\frac{\left (f g^2-h (e g-d h)\right ) \left (a+b x+c x^2\right )^{3/2}}{2 h \left (c g^2-b g h+a h^2\right ) (g+h x)^2}-\frac{(6 c f g-2 c e h-b f h) \tanh ^{-1}\left (\frac{b+2 c x}{2 \sqrt{c} \sqrt{a+b x+c x^2}}\right )}{2 \sqrt{c} h^4}+\frac{\left (8 c^2 g^3 (3 f g-e h)-4 c h \left (b g^2 (10 f g-3 e h)-a h \left (9 f g^2-3 e g h+d h^2\right )\right )+h^2 \left (8 a^2 f h^2-4 a b h (6 f g-e h)+b^2 \left (15 f g^2-h (3 e g+d h)\right )\right )\right ) \tanh ^{-1}\left (\frac{b g-2 a h+(2 c g-b h) x}{2 \sqrt{c g^2-b g h+a h^2} \sqrt{a+b x+c x^2}}\right )}{8 h^4 \left (c g^2-b g h+a h^2\right )^{3/2}}\\ \end{align*}

Mathematica [A]  time = 3.95224, size = 645, normalized size = 1.44 \[ \frac{-\frac{\frac{2 c \sqrt{a+x (b+c x)} \left (h^2 \left (-4 a^2 f h^2-4 a b h (e h-4 f g)+b^2 \left (d h^2+3 e g h-11 f g^2\right )\right )+c h \left (b \left (h (d h (h x-g)+e g (3 h x-7 g))+f g^2 (23 g-7 h x)\right )-2 a h (h (d h-3 e g+2 e h x)+f g (9 g-4 h x))\right )-2 c^2 \left (g h \left (d h^2 x+e g (h x-2 g)\right )+3 f g^3 (2 g-h x)\right )\right )}{h^2}+\frac{c \sqrt{h (a h-b g)+c g^2} \tanh ^{-1}\left (\frac{2 a h-b g+b h x-2 c g x}{2 \sqrt{a+x (b+c x)} \sqrt{h (a h-b g)+c g^2}}\right ) \left (h^2 \left (8 a^2 f h^2+4 a b h (e h-6 f g)+b^2 \left (15 f g^2-h (d h+3 e g)\right )\right )+4 c h \left (a h \left (d h^2-3 e g h+9 f g^2\right )+b g^2 (3 e h-10 f g)\right )+8 c^2 g^3 (3 f g-e h)\right )+4 \sqrt{c} \left (h (a h-b g)+c g^2\right )^2 \tanh ^{-1}\left (\frac{b+2 c x}{2 \sqrt{c} \sqrt{a+x (b+c x)}}\right ) (-b f h-2 c e h+6 c f g)}{h^3}-\frac{2 c (a+x (b+c x))^{3/2} \left (-4 a h^2 (e h-2 f g)+b h \left (h (d h+3 e g)-7 f g^2\right )-2 c g h (d h+e g)+6 c f g^3\right )}{g+h x}}{8 \left (h (a h-b g)+c g^2\right )^2}-\frac{(a+x (b+c x))^{3/2} \left (2 f h (a h-b g)+c h (d h-e g)+3 c f g^2\right )}{2 (g+h x)^2 \left (h (a h-b g)+c g^2\right )}+\frac{f (a+x (b+c x))^{3/2}}{(g+h x)^2}}{c h} \]

Antiderivative was successfully verified.

[In]

Integrate[(Sqrt[a + b*x + c*x^2]*(d + e*x + f*x^2))/(g + h*x)^3,x]

[Out]

((f*(a + x*(b + c*x))^(3/2))/(g + h*x)^2 - ((3*c*f*g^2 + 2*f*h*(-(b*g) + a*h) + c*h*(-(e*g) + d*h))*(a + x*(b
+ c*x))^(3/2))/(2*(c*g^2 + h*(-(b*g) + a*h))*(g + h*x)^2) - ((-2*c*(6*c*f*g^3 - 2*c*g*h*(e*g + d*h) - 4*a*h^2*
(-2*f*g + e*h) + b*h*(-7*f*g^2 + h*(3*e*g + d*h)))*(a + x*(b + c*x))^(3/2))/(g + h*x) + (2*c*Sqrt[a + x*(b + c
*x)]*(h^2*(-4*a^2*f*h^2 - 4*a*b*h*(-4*f*g + e*h) + b^2*(-11*f*g^2 + 3*e*g*h + d*h^2)) - 2*c^2*(3*f*g^3*(2*g -
h*x) + g*h*(d*h^2*x + e*g*(-2*g + h*x))) + c*h*(-2*a*h*(f*g*(9*g - 4*h*x) + h*(-3*e*g + d*h + 2*e*h*x)) + b*(f
*g^2*(23*g - 7*h*x) + h*(d*h*(-g + h*x) + e*g*(-7*g + 3*h*x))))))/h^2 + (4*Sqrt[c]*(6*c*f*g - 2*c*e*h - b*f*h)
*(c*g^2 + h*(-(b*g) + a*h))^2*ArcTanh[(b + 2*c*x)/(2*Sqrt[c]*Sqrt[a + x*(b + c*x)])] + c*Sqrt[c*g^2 + h*(-(b*g
) + a*h)]*(8*c^2*g^3*(3*f*g - e*h) + 4*c*h*(b*g^2*(-10*f*g + 3*e*h) + a*h*(9*f*g^2 - 3*e*g*h + d*h^2)) + h^2*(
8*a^2*f*h^2 + 4*a*b*h*(-6*f*g + e*h) + b^2*(15*f*g^2 - h*(3*e*g + d*h))))*ArcTanh[(-(b*g) + 2*a*h - 2*c*g*x +
b*h*x)/(2*Sqrt[c*g^2 + h*(-(b*g) + a*h)]*Sqrt[a + x*(b + c*x)])])/h^3)/(8*(c*g^2 + h*(-(b*g) + a*h))^2))/(c*h)

________________________________________________________________________________________

Maple [B]  time = 0.285, size = 12139, normalized size = 27.1 \begin{align*} \text{output too large to display} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((f*x^2+e*x+d)*(c*x^2+b*x+a)^(1/2)/(h*x+g)^3,x)

[Out]

result too large to display

________________________________________________________________________________________

Maxima [F(-2)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: ValueError} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((f*x^2+e*x+d)*(c*x^2+b*x+a)^(1/2)/(h*x+g)^3,x, algorithm="maxima")

[Out]

Exception raised: ValueError

________________________________________________________________________________________

Fricas [F(-1)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((f*x^2+e*x+d)*(c*x^2+b*x+a)^(1/2)/(h*x+g)^3,x, algorithm="fricas")

[Out]

Timed out

________________________________________________________________________________________

Sympy [F(-1)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((f*x**2+e*x+d)*(c*x**2+b*x+a)**(1/2)/(h*x+g)**3,x)

[Out]

Timed out

________________________________________________________________________________________

Giac [F(-2)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: TypeError} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((f*x^2+e*x+d)*(c*x^2+b*x+a)^(1/2)/(h*x+g)^3,x, algorithm="giac")

[Out]

Exception raised: TypeError